package com.zhangtai.modules.service.system;

import com.zhangtai.modules.entity.system.AuthorityLogEntity;
import com.zhangtai.utils.PageResult;
import com.zhangtai.utils.R;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


/**
 * 
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2020-08-20 09:18:38
 */

public interface AuthorityLogService {

    @GetMapping("/findAuthorityLogList")
    @ApiOperation(value = "分页查询")
    PageResult queryPage(  @RequestParam(value = "orgIds",required = false) List<Long> orgIds,
                           @RequestParam(value = "updateUserName", required = false) String updateUserName,
                         @RequestParam(value = "jobName", required = false) String jobName,
                         @RequestParam(value = "method", required = false) String method,
                         @RequestParam(value = "type", required = false) String type,
                         @RequestParam(value = "startTime", required = false) String startTime,
                         @RequestParam(value = "endTime", required = false) String endTime,
                           @RequestParam(value = "remark", required = false) String remark,
                           @RequestParam(value = "params", required = false) String params,
                         @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
                         @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize);

    PageResult queryPageBYOid(@RequestParam(value = "oid", required = false) String oid,
                         @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
                         @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize);

    @GetMapping("/infoAuthorityLog")
    @ApiOperation(value = "根据id查找")
    AuthorityLogEntity getByIdE(@RequestParam("id") Long id);

    @PostMapping("/saveAuthorityLog")
    @ApiOperation(value = "保存")
    R saveE(@RequestBody AuthorityLogEntity entity);

    @PostMapping("/updateAuthorityLog")
    @ApiOperation(value = "修改")
    R updateByIdE(@RequestBody AuthorityLogEntity entity);

    @GetMapping("/deleteOneAuthorityLog")
    @ApiOperation(value = "根据ID删除")
    R removeOneById(@RequestParam("id") Long id);

    @PostMapping("/deleteAuthorityLogs")
    @ApiOperation(value = "根据ID集合删除")
    R removeByIdsE(@RequestBody List<Long> ids);
}

